package STUDENT.DOVANTIEN.BASIC.STRUCTURE_PROGRAMMING.OOPS_CONSEPTS.lever01.EX01;

public class Models {
	public double Calculator(NumberObject objNum){
		//1. Khai báo tường minh biến nhận KQ
		double result = 0;
		switch (objNum.getTotal()) {
		case 0: result = objNum.getNumA() + objNum.getNumB();break;
		case 1: result = objNum.getNumA() + objNum.getNumB();break;
		case 2: result = objNum.getNumA() + objNum.getNumB();break;
		case 3: result = objNum.getNumA() + objNum.getNumB();break;

		}
		return result;
	}
	
}

